class TypeUtil {
  static OBJECT = "Object"
  static ARRAY = "Array"
  static UNDEFINED = "Undefined"
  static FUNCTION = "Function"
  static SYMBOL = "Symbol"
  static DATE = "Date"
  static REGEX = "Regex"
  static HTMLDOCUMENT = "HTMLDocument"
  static GLOBAL = "Global"
  static STRING = "String"
  static NUMBER = "Number"
  static BOOLEAN = "Boolean"
  static REGEX = "Regex"
  static NULL = "Null"
  isObject = function (val) {
    return Object.prototype.toString.call(val) === '[object Object]';
  }
  isArray = function (val) {
    return Object.prototype.toString.call(val) === '[object Array]';
  }
  isUndefined = function (val) {
    return Object.prototype.toString.call(val) === '[object Undefined]';
  }
  isNull = function (val) {
    return Object.prototype.toString.call(val) === '[object Null]';
  }
  isString = function (val) {
    return Object.prototype.toString.call(val) === '[object String]';
  }
  isNumber = function (val) {
    return Object.prototype.toString.call(val) === '[object Number]';
  }
  isBoolean = function (val) {
    return Object.prototype.toString.call(val) === '[object Boolean]';
  }
  isSymbol = function (val) {
    return Object.prototype.toString.call(val) === '[object Symbol]';
  }
  isFunction = function (val) {
    return Object.prototype.toString.call(val) === '[object Function]';
  }
  isDate = function (val) {
    return Object.prototype.toString.call(val) === '[object Date]';
  }
  isRegex = function (val) {
    return Object.prototype.toString.call(val) === '[object Regex]';
  }
  isHTMLDocument = function (val) {
    return Object.prototype.toString.call(val) === '[object HTMLDocument]';
  }
  isGlobal = function (val) {
    return Object.prototype.toString.call(val) === '[object Global]';
  }
  getTypeName = function (val) {
    const type = Object.prototype.toString.call(val);
    return type.replace("[object ", "").replace("]", "");
  }
}
export default new TypeUtil();
